package com.hoshiicloud.user.entity.supppiler;

import lombok.Data;

import java.io.Serializable;

@Data
public class  UploadFileResponse implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 文件名
	 */
	private String fileName;

	/**
	 * 访问url
	 */
	private String url;

	/**
	 * 文件key,上传时存储的对象key,如果key相同并且文件已存在，将覆盖文件
	 */
	private String objectKey;

	private int code;

	private String message;


    public UploadFileResponse(int code, String message){
    	this.code=code;
    	this.message=message;
    }

	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public boolean isSuccess(){
        return this.code== 200;
    }

	public String getObjectKey() {
		return objectKey;
	}

	public void setObjectKey(String objectKey) {
		this.objectKey = objectKey;
	}


}
